Skip to content

Bsp/m5stack core s3 regen#761

Open
espzav wants to merge 3 commits intomasterfrom
bsp/m5stack_core_s3_regen
Open

Bsp/m5stack core s3 regen#761
espzav wants to merge 3 commits intomasterfrom
bsp/m5stack_core_s3_regen

Conversation

@espzav
Copy link
Copy Markdown
Collaborator

@espzav espzav commented Apr 16, 2026

ESP-BSP Pull Request checklist

  • Version of modified component bumped
  • CI passing

Description

  • Regenerated BSP for M5Stack CoreS3
  • Updated camera for usig esp_video
  • Removed display_camera example (using old esp32_camera - no more boards are use it)
  • Fixed delay in BMI270
  • Added pytest for display_camera_video example
  • Temporary disabled M5Stack CoreS3 from display_rotation example (due to using another IMU and this example should be reworked for it)

Closes #728
Closes #729
Closes #754

Related to #374 - it should be fixed too.


Note

Medium Risk
Substantial refactor of the m5stack_core_s3 BSP into new per-peripheral modules and APIs (display lifecycle, feature power control, sensors/USB), plus a camera stack migration to esp_video, which may affect initialization order and shared SPI/I2C behavior across examples.

Overview
Regenerates the m5stack_core_s3 BSP by replacing the monolithic implementation with modular sources (bsp_display, bsp_i2c, bsp_spi, bsp_storage, bsp_audio, bsp_camera, bsp_usb, bsp_sensors) and bumping the component to 4.0.0 with new dependencies (IO expander, esp_video, USB host, BMI270).

Updates the public API surface: adds bsp_i2c_get_handle(), SPI init/deinit APIs, display lifecycle helpers (bsp_display_new_with_handles(), bsp_display_delete(), sleep entry/exit, brightness deinit), a unified bsp_feature_enable() power-control layer (AXP2101 + AW9523), bsp_camera_start(), and sensor-hub based bsp_sensor_init() (IMU enabled).

Example/CI churn: removes legacy examples/display_camera (and drops it from Kaluga docs), adds a pytest smoke test for examples/display_camera_video and runs it in CI, updates example sdkconfigs for CoreS3 (camera/video, sdcard, sensors), and refreshes top-level README tables to reflect CoreS3 camera/IMU and example support changes.

Sensor driver tweak: bumps bmi270 component to 1.0.1 and increases power-on/soft-reset delays to improve init reliability.

Reviewed by Cursor Bugbot for commit 87963dc. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread bsp/m5stack_core_s3/src/bsp_feature_en.c
Comment thread bsp/m5stack_core_s3/src/bsp_feature_en.c
Comment thread bsp/m5stack_core_s3/src/bsp_feature_en.c
@espzav espzav force-pushed the bsp/m5stack_core_s3_regen branch from 21592ca to a68d071 Compare April 16, 2026 08:59
Comment thread bsp/m5stack_core_s3/src/bsp_feature_en.c
Comment thread bsp/m5stack_core_s3/src/bsp_io_expander.c
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 16, 2026

Test Results

32 tests   32 ✅  1m 35s ⏱️
 6 suites   0 💤
 6 files     0 ❌

Results for commit 87963dc.

♻️ This comment has been updated with latest results.

@espzav espzav force-pushed the bsp/m5stack_core_s3_regen branch 3 times, most recently from 68f5b7e to 6095af1 Compare April 16, 2026 10:34
Comment thread bsp/m5stack_core_s3/src/bsp_feature_en.c
@espzav espzav force-pushed the bsp/m5stack_core_s3_regen branch from 6095af1 to 3d4ca37 Compare April 16, 2026 10:47
Comment thread bsp/m5stack_core_s3/src/bsp_storage.c
@espzav espzav force-pushed the bsp/m5stack_core_s3_regen branch from 3d4ca37 to 5e44436 Compare April 16, 2026 11:11
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5e44436. Configure here.

usb_host_task = NULL;
}
return ESP_OK;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

USB host uninstalled before event task stopped

Medium Severity

bsp_usb_host_stop calls usb_host_uninstall() before suspending/deleting the usb_lib_task. The task may still be blocked in usb_host_lib_handle_events() when the host is uninstalled, leading to a crash or undefined behavior. The task needs to be stopped before uninstalling the USB host library.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5e44436. Configure here.

@espzav espzav force-pushed the bsp/m5stack_core_s3_regen branch 2 times, most recently from bb757af to aee5b3b Compare April 16, 2026 13:41
@espzav espzav force-pushed the bsp/m5stack_core_s3_regen branch from aee5b3b to 87963dc Compare April 17, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

M5Stack CoreS3: CONFIG_FATFS_LONG_FILENAMES macro is not defined (BSP-786) how to add imu bsp for M5Stack CoreS3 (BSP-785)

2 participants